﻿@model ProgressTracker.WebUI.Models.Account.LoginModel

@{
    ViewBag.Title = "Login";
}

@if (!Html.ViewData.ModelState.IsValid)
{
 <div class="alert alert-danger">
     @Html.ValidationSummary()
 </div>   
}

@using(Html.BeginForm("Login", "Account", null, FormMethod.Post, new { id = "loginForm", @class = "form-horizontal" }))
{
    <div class="form-group">
        <div class="col-md-1 col-sm-1 col-xs-2"  >            
            @Html.LabelFor(x => x.Email)
        </div>
        <div class="col-md-6 col-sm-6 col-xs-12" >
            @Html.TextBoxFor(x => x.Email, new { required = "required", type = "email", @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-1 col-sm-1 col-xs-2" >
            @Html.LabelFor(x => x.Password)
        </div>
        <div class="col-md-6 col-sm-6 col-xs-12">
            @Html.TextBoxFor(x => x.Password, new { required = "required", @class = "form-control", type = "password" })
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-1 col-xs-4">
            <div class="checkbox">
                Remember Me? @Html.CheckBoxFor(x => x.RememberUser)
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-1 col-xs-11" >
            <button class="btn btn-primary" type="submit">Login</button>
            <a href="@Url.Action("Create")" class="btn btn-default">Create New Account</a>
            <a href="@Url.Action("ResetPassword")" class="btn btn-default">Forgot Password?</a>
        </div>
    </div>
}
<script src="~/Scripts/Account/Login.js"></script>